function dout = flexmask(din , t , mt , ot, odim, offs)
% flexmask  - flexible data masking
%
% FORMAT:       dout = flexmask(din [, t , mt , ot, odim, offs])
%
% Input fields:
%
%       din         2D/3D data (logical or numeric)
%       t           threshold (masking operand; default: 0)
%       mt          type of masking (-1: <=, 0: ==, 1: >=, 2: none; default 1)
%       ot          output type (0: as input, 1: boolean; default 0)
%       odim        1x3 size, put result in array of size; default as input
%       offs        1x3 offset, e.g. [1, 1, 1] skips one index in each dim
%                   default: center in new array (floor offset)
%
% Output fields:
%
%       dout        masked data
%
% Note: This is a MEX compiled function !

% Version:  v0.7f
% Build:    8110521
% Date:     Nov-05 2008, 9:00 PM CET
% Author:   Jochen Weber, SCAN Unit, Columbia University, NYC, NY, USA
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% just bail out
error( ...
    'BVQXtools:MEXMissing', ...
    'This is a compiled function, but the MEX file is missing.' ...
);
